﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Pay.TO;

namespace Pay.DTO {
	/// <summary>
	/// 批量提现请求
	/// </summary>
	[JsonObject(MemberSerialization.OptOut)]
	[Serializable]
	public class batch_transfer {
		public batch_transfer() {
			orders = new List<transfer_item_model>();
		}
		/// <summary>
		/// 商户id
		/// </summary>
		public long merchant_id { get; set; }
		/// <summary>
		/// 批号，不可以重复
		/// </summary>
		public string batch_no { get; set; }
		/// <summary>
		/// 通道
		/// </summary>
		public PayChannel pay_channel { get; set; }
		/// <summary>
		/// 提现单集合
		/// </summary>
		public List<transfer_item_model> orders { get; set; }

		/// <summary>
		/// 支付方式：默认PAYOFF
		/// </summary>
		[JsonIgnore]
		public string pay_code { get { return "PAYOFF"; } }
		/// <summary>
		/// 支付类型：默认Payoff
		/// </summary>
		[JsonIgnore]
		public PayType pay_type { get { return PayType.Payoff; } }
		/// <summary>
		/// 通道文件名
		/// </summary>
		[JsonIgnore]
		public string batch_file { get; set; }
	}
	/// <summary>
	/// 批量提现单集合
	/// </summary>
	[Serializable]
	[JsonObject(MemberSerialization.OptOut)]
	public class transfer_item_model {
		/// <summary>
		/// 订单号
		/// </summary>
		public string order_no { get; set; }
		/// <summary>
		/// 交易金额:单位：分
		/// </summary>
		public string tran_amount { get; set; }
		/// <summary>
		/// 开户银行名称
		/// </summary>
		public string bank_name { get; set; }
		/// <summary>
		/// 卡号
		/// </summary>
		public string account_no { get; set; }
		/// <summary>
		/// 开户姓名/公司名称
		/// </summary>
		public string account_name { get; set; }
		/// <summary>
		/// 身份证
		/// </summary>
		public string id_card { get; set; }
		/// <summary>
		/// 卡类型
		/// </summary>
		public int busi_type { get; set; }
		/// <summary>
		/// 省
		/// </summary>
		public string province { get; set; }
		/// <summary>
		/// 市
		/// </summary>
		public string city { get; set; }
		/// <summary>
		/// 支行编号
		/// </summary>
		public string branch_code { get; set; }
		/// <summary>
		/// 支行名称
		/// </summary>
		public string branch_name { get; set; }
		/// <summary>
		/// 业务流水单号
		/// </summary>
		public string pay_no { get; set; }
		/// <summary>
		/// 第三方处理单号
		/// </summary>
		public string transaction_no { get; set; }
	}
	/// <summary>
	/// 批量提现返回
	/// </summary>
	public class batch_transfer_result : ApiResultMessage {
		/// <summary>
		/// 批号，不可以重复
		/// </summary>
		public string batch_no { get; set; }
		/// <summary>
		/// 状态：1处理中，2失败
		/// </summary>
		public int status { get; set; }
	}
}
